package ooday02;
//重写
public class OverrideDemo {
    public static void main(String[] args) {
        //重写方法被调用时 看对象的执行类型
            Student zg=new Student("张光",23,"廊坊","jsd2505","003");
            zg.sayHi();
            Teacher ll=new Teacher("李磊",34,"陕西",7888);
            ll.sayHi();
            Doctor zl=new Doctor("张磊",45,"新疆","主任医师");
            zl.sayHi();
    }
}
